<?php

namespace App\Http\Requests\Front;

use App\Http\Requests\Request;

class CreatOrderRequest extends Request
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            //
            'address_id'=>'required|exists:address,address_id',
            //'payType'=>'required',
            //'expressType'=>'required'

        ];
    }
    public function messages(){

        return [

            'address_id.required'=>'请选择收货地址',
            'address_id.exists'=>'收货地址不存在',
            'payType'=>'请选择支付方式',
            'expressType'=>'请选择配送方式'
        ];
    }

}
